<!DOCTYPE html>
<html>

<head>
    <!--#include virtual="/public/inc/head.html"-->
    <title>明源云客-小蜜蜂</title>
    <!--#include virtual="/public/inc/seajs.html" -->
    <style type="text/css">
        .tab {
            position: relative;
        }
        
        .tab .btn-group {
            position: absolute;
            right: 0;
            bottom: 4px;
        }
        
        .tab .btn-group .btn {
            color: #fff;
        }
        
        .tab .btn-group .btn:hover {
            color: #fff;
        }
        
        .active_list .fag {
            display: inline-block;
            background-color: #9797A6;
            color: #FFF;
            border-radius: 50px;
            font-size: 12px;
            width: 90px;
            text-align: center;
            vertical-align: middle;
        }
        
        .member_name {
            display: inline-block;
            width: 150px;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
        }
        
        .member_name_a {
            display: inline-block;
            overflow: hidden;
        }
        .img-thumbnail{display: inline-block;
            max-width: 100%;
            height: auto;
            padding: 4px;
            line-height: 1.42857143;
            background-color: #fff;
            border: 1px solid #ddd;
            border-radius: 4px;
            -webkit-transition: all .2s ease-in-out;
            -o-transition: all .2s ease-in-out;
            transition: all .2s ease-in-out;}
    </style>
</head>

<body>
    <!-- data-permission="50030601-00" data-func-codes="50030601"-->
    <!--#include virtual="/public/inc/top.html" -->
    <div class="container">
        <div class="wrap clearfix">
            <!--#include virtual="/public/inc/side.html" -->
            <!-- <div ng-hide="true" class="content content-loading"></div>-->

            <div class="content" ng-controller="MainController">
                <!--查看活动-->
                <div>
                    <div class="grid-header pl10 mt10 grid-header-left-line relative">
                        <div class="clearfix">
                            <span class="fl f14 lh30 text-indent">基本信息</span>
                        </div>
                        <div class="tab-bottom-line"></div>
                    </div>
                    <table width="100%" class="mt10">
                        <tbody>
                            <tr>
                                <td class="pt16" valign="top" width="88"><em class="c-red mr5">*</em>活动名称：</td>
                                <td class="pt16 c-gray" valign="top"  colspan="2"  ng-cloak>
                                    {{activity.act_detail.act_name}}
                                </td>
                                <td rowspan="3">
                                    <div class="act_qc_code fr btn" style="width:140px;background: transparent;">
                                        <img class="img-thumbnail" alt="活动二维码" ng-cloak ng-show="activity.act_detail.qr_code ||activity.act_detail.wx_qr_code" ng-src="{{activity.act_detail.qr_code ||activity.act_detail.wx_qr_code}}">
                                    </div>
                                </td>
                            </tr>
                            <tr ng-repeat="act_type in activity.act_type_list" ng-if="act_type.type_id == activity.act_detail.act_type_id">
                                <td class="pt16" valign="top" width="88"><em class="c-red mr5">*</em>活动类型：</td>
                                <td class="pt16 c-gray" valign="top"  colspan="3"  ng-cloak>{{act_type.type_name}}</td>
                            </tr>
                            <tr>
                                <td class="pt16" valign="top" width="88">&nbsp;&nbsp;&nbsp;拓客目标：</td>
                                <td class="pt16 c-gray" valign="top"  colspan="3" ng-cloak>{{activity.act_detail.target}}人</td>
                            </tr>
                            <tr>
                                <td class="pt16" width="88" valign="top"><em class="c-red mr5">*</em>活动时间：</td>
                                <td class="pt16 c-gray" valign="top"  colspan="3" ng-cloak>{{activity.act_detail.start_time}} — {{activity.act_detail.end_time}}</td>
                            </tr>
                            <tr>
                                <td class="pt16" valign="top" width="88"><em class="c-red mr5">*</em>活动地点：</td>
                                <td class="pt16 c-gray" valign="top" colspan="3" ng-cloak>{{activity.act_detail.province_name}}{{activity.act_detail.city_name}}{{activity.act_detail.district_name}}{{activity.act_detail.address}}</td>
                            </tr>
                            <tr>
                                <td class="pt16" valign="top">&nbsp;&nbsp;&nbsp;备注：</td>
                                <td class="pt16 c-gray" valign="top"  colspan="3" ng-cloak>{{activity.act_detail.remark}}</td>
                            </tr>
                        </tbody>
                    </table>
                    <div class="grid-header pl10 mt10 grid-header-left-line relative">
                        <div class="clearfix">
                            <span class="fl f14 lh30 text-indent">活动设置</span>
                        </div>
                        <div class="tab-bottom-line"></div>
                    </div>
                    <table width="100%" class="mt10">
                        <tbody>
                            <tr>
                                <td class="pt16" valign="top" width="100"><em class="c-red mr5">*</em>是否发放礼品：</td>
                                <td valign="top" class="pt16 c-gray" ng-cloak>{{activity.act_detail.is_send_present == 1 ? "是" : "否"}}</td>
                            </tr>
                            <tr>
                                <td class="pt16" valign="top" width="210"><span class="fl"><em class="c-red mr5">* </em>是否要求客户关注营销公众号</span><i class="report-icon-help"
                                                                                                                                               ui-tip="" url="dialog/tips1.html"></i>：</td>
                                <td valign="top" class="pt16 c-gray" ng-cloak>{{activity.act_detail.is_selected_mtoken == 1 ? "是" : "否"}}</td>
                            </tr>
                            <tr ng-show="activity.act_detail.is_selected_mtoken == 0" ng-cloak>
                                <td class="pt16" valign="top" width="200"><span class="fl"><em class="c-red mr5">*</em>是否引导注册经纪人</span><i class="report-icon-help"
                                                                                                                                          ui-tip="" url="dialog/tips3.html"></i>：</td>
                                <td valign="top" class="pt16 c-gray" ng-cloak>{{activity.act_detail.is_reg_agent == 1? "是" : "否"}}</td>
                            </tr>
                        </tbody>
                    </table>
                    <div class="grid-header pl10 mt10 grid-header-left-line relative">
                        <div class="clearfix">
                            <span class="fl f14 lh30 text-indent">任务分配</span>
                        </div>
                        <div class="tab-bottom-line"></div>
                    </div>
                    <div class="sheet mt10">
                        <table width="100%">
                            <thead>
                                <tr class="thead ta-l">
                                    <th height="34" width="50" style="text-align: center">
                                        序号
                                    </th>
                                    <th style="text-align: center" width="230">任务时间</th>
                                    <th style="text-align: center">任务地点</th>
                                    <th style="text-align: center" width="100">拓客目标</th>
                                    <th style="text-align: center" width="200">拓客人</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="task in activity.task_detail">
                                    <td height="34" ng-cloak>{{$index + 1}}</td>
                                    <td ng-cloak>{{task.start_time}} — {{task.end_time}}</td>
                                    <td ng-cloak>{{task.province_name}}{{task.city_name}}{{task.district_name}}{{task.address}}</td>
                                    <td ng-cloak>{{task.target}}</td>
                                    <td ng-cloak>
                                        <p class="member_name">{{task.members}}</p>
                                        <a class="c-orange member_name_a" 
                                            ng-if="task.member_users.length"
                                            ui-dialog="查看成员" 
                                            ui-dialog-data="task"
                                            ui-dialog-cache="false"
                                            ui-dialog-url="dialog/member_view.html">查看</a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="grid-header pl10 mt10 grid-header-left-line relative">
                        <div class="clearfix">
                            <span class="fl f14 lh30 text-indent">拓客结果</span>
                            <div class="fr">
                                <a href="javascript:;" class="btn" ng-click="viewCustomerConfirm()">客户确认</a>
                                <a href="javascript:;" class="btn btn-yellow"
                                    ui-dialog="导入客户"
                                    ui-dialog-url="dialog/import.html"
                                    ui-dialog-cache="false"
                                    ui-dialog-before-show="customerImporter.onDialogShow($dialog,$dialogScope)"
                                    ui-dialog-ok="customerImporter.save($dialog,$dialogScope)">导入客户</a>
                                <a href="javascript:;" class="btn btn-yellow" ng-click="exportExpandResult()">导出</a>
                            </div>
                        </div>
                        <div class="tab-bottom-line"></div>
                    </div>
                    <div class="sheet mt10">
                        <table width="100%">
                            <thead>
                                <tr class="thead ta-l">
                                    <th height="34" width="50" style="text-align: center">
                                        序号
                                    </th>
                                    <th style="text-align: center">任务地点</th>
                                    <th style="text-align: center">拓客人</th>
                                    <th style="text-align: center">拓客量</th>
                                    <th style="text-align: center">有效量</th>
                                    <th style="text-align: center">到访量</th>
                                    <th style="text-align: center">成交量</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="user in activity.user_tk_list" ng-cloak>
                                    <td height="34">{{$index + 1}}</td>
                                    <td>{{user.long_address}}</td>
                                    <td>{{user.user_name}}</td>
                                    <td>{{user.user_tkl}}</td>
                                    <td>{{user.valid_count}}</td>
                                    <td>{{user.visitor_count}}</td>
                                    <td>{{user.deal_count}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="text-center mt25">
                        <a href="javascript:;" class="btn" ng-click="edit()">修改</a>
                        <a href="javascript:;" class="btn btn-gray" ng-click="cancel()">取消</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--#include virtual="/public/inc/footer.html" -->

    <script type="text/javascript">
        seajs.use(['service/global',"service/intermediary_organ/bee/activity/view"]);
    </script>
</body>

</html>